﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using AMS.DataAccess.Trademark.Filters;
using AMS.DataAccess.Trademark.BO;

namespace AMS.DataAccess.Trademark.Interfaces
{
    public interface IRFTaskManager
    {
        /// <summary>
        /// 获取所有的收文任务的对应关系
        /// </summary>
        /// <param name="filter"></param>
        /// <returns></returns>
        DataTable GetRFTasks(RFTaskFilter filter);
        /// <summary>
        /// 获取所有任务生成文档的对应关系
        /// </summary>
        /// <returns></returns>
        DataTable GetTaskDocs(TaskDocFilter filter);
        /// <summary>
        /// 获取所有的案件种类
        /// </summary>
        /// <returns></returns>
        DataTable GetCaseTypes();
        /// <summary>
        /// 获取案件对应的流程
        /// </summary>
        /// <param name="caseTypeID"></param>
        /// <returns></returns>
        DataTable GetCaseRFTask(string caseTypeID);
        /// <summary>
        /// 为案件添加收文
        /// </summary>
        /// <param name="caseID"></param>
        /// <param name="rfIndex"></param>
        /// <param name="index">如果是-1，则添加最后，否则，插入到队列中</param>
        void InsertRFToCaseProcess(string caseID, string rfIndex, int index);
        /// <summary>
        /// 为案件添加收文
        /// </summary>
        /// <param name="caseID"></param>
        /// <param name="rfIndex"></param>
        void AddRFToCase(string caseID, string rfIndex);
        /// <summary>
        /// 从流程中删除收文
        /// </summary>
        /// <param name="caseID"></param>
        /// <param name="rfIndex"></param>
        void DeleteRFFromCase(string caseID, string rfIndex);
        /// <summary>
        /// 交易两个收文的序号
        /// </summary>
        /// <param name="rfIndexA"></param>
        /// <param name="rfOrderA"></param>
        /// <param name="rfIndexB"></param>
        /// <param name="rfOrderB"></param>
        void SwapNodeOrderIndex(string caseID, string rfIndexA, int rfOrderA, string rfIndexB, int rfOrderB);
        /// <summary>
        /// 获取收文信息
        /// </summary>
        /// <param name="rfIndex"></param>
        /// <returns></returns>
        RFCategoryInfo GetRecvFile(string rfIndex);
        /// <summary>
        /// 获取任务信息
        /// </summary>
        /// <param name="taskIndex"></param>
        /// <returns></returns>
        TaskCategoryInfo GetTask(string taskIndex);
        /// <summary>
        /// 获取任务列表信息
        /// </summary>
        /// <param name="filter"></param>
        /// <returns></returns>
        List<TaskCategoryInfo> GetTasks(TaskCategoryFilter filter);
        /// <summary>
        /// 更新收文信息
        /// </summary>
        /// <param name="recvfile"></param>
        /// <returns></returns>
        bool UpdateRecvFile(RFCategoryInfo recvFile);
        /// <summary>
        /// 添加收文信息
        /// </summary>
        /// <param name="recvFile"></param>
        void AddRecvFile(RFCategoryInfo recvFile);
        /// <summary>
        /// 删除收文信息
        /// </summary>
        /// <param name="rfIndex"></param>
        void DeleteRecvFile(string rfIndex);
        /// <summary>
        /// 添加任务
        /// </summary>
        /// <param name="task"></param>
        void AddTask(TaskCategoryInfo task);
        /// <summary>
        /// 更新任务
        /// </summary>
        /// <param name="task"></param>
        /// <returns></returns>
        bool UpdateTask(TaskCategoryInfo task);
        /// <summary>
        /// 删除任务
        /// </summary>
        /// <param name="taskIndex"></param>
        void DeleteTask(string taskIndex);
    }
}
